//
//  demoViewController.swift
//  新浪微博
//
//  Created by apple on 15/7/30.
//  Copyright © 2015年 Adam. All rights reserved.
//

import UIKit

class demoViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

    }

    //自动布局方法抽取
    //        func  layoutSubs(obj:NSObject,attribute:NSLayoutAttribute,toItem:NSObject?,toattribute:NSLayoutAttribute,constant:CGFloat){
    //            //translatesAutoresizingMaskIntoConstraints=false
    //           addConstraint(NSLayoutConstraint(item: obj, attribute: attribute, relatedBy: NSLayoutRelation.Equal, toItem: toItem, attribute: toattribute, multiplier: 1, constant: constant))
    //        }
    //        //圆圈的布局
    //        iconView.translatesAutoresizingMaskIntoConstraints=false
    //        layoutSubs(iconView,attribute: NSLayoutAttribute.CenterX,toItem: self,  toattribute: NSLayoutAttribute.CenterX, constant: 0)
    //        layoutSubs(iconView, attribute: NSLayoutAttribute.CenterY, toItem: self, toattribute: NSLayoutAttribute.CenterY, constant:-80)
    //        //房子的布局
    //        houseView.translatesAutoresizingMaskIntoConstraints=false
    //        layoutSubs(houseView, attribute: NSLayoutAttribute.CenterX, toItem: iconView, toattribute: NSLayoutAttribute.CenterX, constant: 0)
    //        layoutSubs(houseView, attribute: NSLayoutAttribute.CenterY, toItem: iconView, toattribute: NSLayoutAttribute.CenterY, constant: 0)
    //        //标签按钮
    //        messageLabel.translatesAutoresizingMaskIntoConstraints=false
    //         layoutSubs(messageLabel, attribute: NSLayoutAttribute.CenterX, toItem: iconView, toattribute: NSLayoutAttribute.CenterX, constant: 0)
    //        layoutSubs(messageLabel, attribute: NSLayoutAttribute.Top, toItem: iconView, toattribute: NSLayoutAttribute.Bottom, constant: 16)
    //        layoutSubs(messageLabel, attribute: NSLayoutAttribute.Width, toItem: nil, toattribute: NSLayoutAttribute.NotAnAttribute, constant: 224)
    //        //注册按钮的布局
    //       registerButton.translatesAutoresizingMaskIntoConstraints=false
    //       layoutSubs(registerButton, attribute: NSLayoutAttribute.Top, toItem: messageLabel, toattribute: NSLayoutAttribute.Bottom, constant: 16)
    //       layoutSubs(registerButton, attribute: NSLayoutAttribute.Left, toItem: messageLabel, toattribute: NSLayoutAttribute.Left, constant: 0)
    //        layoutSubs(registerButton, attribute: NSLayoutAttribute.Width, toItem: nil, toattribute: NSLayoutAttribute.NotAnAttribute, constant: 100)
    //        layoutSubs(registerButton, attribute: NSLayoutAttribute.Height, toItem: nil, toattribute: NSLayoutAttribute.NotAnAttribute, constant: 35)
    //        //登录按钮
    //        loginButton.translatesAutoresizingMaskIntoConstraints=false
    //        layoutSubs(loginButton, attribute: NSLayoutAttribute.Top, toItem: messageLabel, toattribute: NSLayoutAttribute.Bottom, constant: 16)
    //        layoutSubs(loginButton, attribute: NSLayoutAttribute.Right, toItem: messageLabel, toattribute: NSLayoutAttribute.Right, constant: 0)
    //        layoutSubs(loginButton, attribute: NSLayoutAttribute.Width, toItem: nil, toattribute: NSLayoutAttribute.NotAnAttribute, constant: 100)
    //        layoutSubs(loginButton, attribute: NSLayoutAttribute.Height, toItem: nil, toattribute: NSLayoutAttribute.NotAnAttribute, constant: 35)
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
